package online.heycm;

import java.io.*;

/**
 * PDF Path
 *
 * @author hey
 * @version 1.0
 * @since 2024-8-16 20:42:19
 */
public class PdfPath extends PDF {
    private final String originalPath;
    private final String savePath;

    public PdfPath(String path) {
        this.originalPath = path;
        this.savePath = path;
    }

    public PdfPath(String originalPath, String savePath) {
        this.originalPath = originalPath;
        this.savePath = savePath;
    }

    @Override
    protected InputStream initInputStream() throws IOException {
        return new BufferedInputStream(new FileInputStream(originalPath));
    }

    @Override
    protected OutputStream initOutputStream() throws IOException {
        return new BufferedOutputStream(new FileOutputStream(savePath));
    }
}
